<nz-tree-select
    #nzTree
    (nzExpandChange)="onExpandChange($event)"
    [(ngModel)]="value"
    [disabled]="disabled"
    [nzDropdownStyle]="nzDropdownStyle"
    [nzNodes]="categoryValues"
    [nzShowIcon]="true"
    nzAllowClear
    nzPlaceHolder="==请选择字典分类=="
    nzShowSearch
    style="width: 50%; max-width: 200px;">
    <ng-template #nzTreeTemplate let-node>
        <div [class.ant-tree-node-selected]="node.isSelected" class="ant-tree-node-content-wrapper">
            <div class="sys-code-category-tree-node"
                 style="display: inline-block;">
                <span *ngIf="node.origin.type === 'root'">
                   <i nz-icon nzType="dr:hy-root" theme="fill"></i>
                </span>
                <span *ngIf="node.origin.type === 'module'">
                   <i nz-icon nzType="dr:hy-module" theme="fill"></i>
                </span>
                <span *ngIf="node.origin.type === 'leaf'">
                   <i nz-icon nzType="dr:hy-terminal" theme="fill"></i>
                </span>
                <span class="title-name">{{ node.title }}</span>
                <span *ngIf="node.origin.type==='leaf'" class="title-code">{{ node.origin.data.code }}</span>
            </div>
        </div>
    </ng-template>
</nz-tree-select>
